﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Diagnostics;
using System.ComponentModel;
using WPFExcelReport.Helpers;
using System.Windows.Input;
namespace WPFExcelReport
{
    public partial class TUBTBS07
    {
        public TUBTBS07()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VBSFARB();
            this.DataContext = MV;
            InitializeComponent();
        }
        public override void QueryCommand(object sender, RoutedEventArgs e)
        {
            dwData = TBMain.NewRow();
            dwData["BSFMANDANT"] = app.Mandant;
            dwData["BSFKART"] = " AND BSFKART LIKE '%"+ART.Trim()+"%'";
            SResult = TMV.QBSF04(dwData);
            MergeData(SResult, false);
            base.QueryCommand(sender, e);
        }
        public override void EditCommand(object sender, RoutedEventArgs e)
        {
            base.EditCommand(sender, e);
        }
        public override void SaveCommand(object sender, RoutedEventArgs e)
        {
            base.SaveCommand(sender, e);
        }
        public override void LOADBYAUF()
        {
            //base.LOADBYAUF();
        }
        public override void OnWTKEYChg()
        {
            if (!IsEdit)
                return;
            if (dwMaster == null)
                return;
            dwMaster["BSSRFNR"] = WTKEY;
            base.OnWTKEYChg();
        }
    }
}
